package org.esk.dablog.dao;

import org.esk.dablog.model.Author;

import java.util.List;

/**
 * This interface provides db-level Author Entity operations
 * User: jc
 * Date: 01.12.2006
 * Time: 16:30:15
 * $Id:$
 */
public interface AuthorDAO {


    /**
     * returns Author instance by its username value
     * @param username
     * @return
     */
    Author getAuthorByUsername(String username);

    /**
     * saves Author instance
     * @param a
     * @return
     */
    long saveAuthor(Author a);

    /**
     * loads last registered users
     * @param usersCount
     * @return
     */
    List listLastRegisteredUsers(int usersCount);

    /**
     * returns Author by id
     * @param id
     * @return
     */
    Author getAuthorById(long id);
}
